<template>
	<view>
		<view style="height: 100vh; display: flex; align-items: center; justify-content: center;">
			<view class="paishe" @click="chooseVideo">
				<text class="iconfont icon-paishipin"></text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				src:''
			};
		},
		onLoad() {
			this.chooseVideo()
		},
		methods: {
			chooseVideo: function() {
				uni.chooseVideo({
					sourceType: ['camera'],
					success(res) {
						console.log(res)
						if(res.errMsg === 'chooseVideo:ok') {
							uni.setStorageSync('videoPath', res.tempFilePath)
							uni.navigateTo({
								url: '/pages/caseEntry/add'
							})
						}
					}
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
.paishe {
	width: 150rpx; height: 150rpx; background-color: #FFFFFF; box-shadow: 0 10rpx 20rpx rgba(0,0,0,0.06); border-radius: 150rpx; display: flex; justify-content: center; align-items: center;
	.icon-paishipin {
		font-size: 80rpx; color: #4CD964;
	}
}
</style>
